home *** CD-ROM | disk | FTP | other *** search
/ Invisible Universe / Invisible Universe (1995)(Voyager)[Mac-PC].iso / mac / MOVIES / TOC.DIR / 00006_Script_pplx < prev    next >
Text File  |  1995-11-21  |  2KB  |  77 lines

  1. --  assigns preload frames to a label name
  2. --- ancestor of spb
  3. --property myLabelName, myMovieName, startFrame, endFrame
  4. --
  5. --on birth me, MN, LN, SF, EF
  6. --  set myLabelName to string(LN)
  7. --  set myMovieName to string(MN)
  8. --  if integerP(SF) then set startFrame to SF
  9. --  else set startFrame to (the value of label(SF))
  10. --  if integerP(EF) then set endFrame to EF
  11. --  set endFrame to (the value of label(EF))
  12. --  return me
  13. --end birth
  14.  
  15. --dump the loaded, preload and go
  16. on pplkoadNGo startFrame, endFrame, myMovieName
  17.   if myMovieName&".DIR" = the movieName then 
  18.     pplload startFrame, endFrame
  19.   end if
  20.   
  21.   justGo me
  22. end loadNGo
  23.  
  24. --dump the loaded and preload
  25. on pplload startFrame, endFrame
  26.   global gLastPreloadStartFrame, gLastPreloadEndFrame--, gCursor
  27.   --if gLastPreloadStartFrame = startFrame and gLastPreloadEndFrame = endFrame then   
  28.   --unload gLastPreloadStartFrame, gLastPreloadEndFrame
  29.   -- dmd
  30.   --put ">>> load in cast 6 ppl TOC.DIR note unloading cast 1,5000"   
  31.   
  32.   --put the freeBytes
  33.   --  set dontChangeCursor = (gCursor = 4)
  34.   --  set gCursor = 4
  35.   --  cursor gCursor
  36.   --  
  37.   cursor 4
  38.   
  39.   if the freeBytes < ramNeeded(startFrame + 1, endFrame - 1) then 
  40.     --put ">>> pplload: note unloading cast 1,1000"
  41.     --put ">>> needed Ram: " & ¼
  42. startFrame + 1 && endFrame - 1 ¼
  43. && ramNeeded(startFrame, endFrame - 1) 
  44.     unloadCast 1,1000
  45.     if the machineType <> 256 then maxmem()
  46.     --put the freeBytes  
  47.   end if
  48.   
  49.   set the preLoadEventAbort = 0
  50.   --put ">>>pplload preloading frame: " & startFrame & "-" & (endFrame-1) 
  51.   preload startFrame, (endFrame -1)
  52.   set the preLoadEventAbort = 1
  53.   
  54.   --put the freebytes
  55.   
  56.   
  57.   --put ">>>pplx loading from frames: " & startFrame & " to " & endFrame
  58.   
  59.   --  if not dontChangeCursor then
  60.   --    set gCursor = -1
  61.   --    cursor gCursor
  62.   --  end if
  63.   --  
  64.   
  65.   cursor -1
  66.   
  67.   set gLastPreloadStartFrame to startFrame
  68.   set gLastPreloadEndFrame to endFrame
  69. end load
  70.  
  71. --just go
  72. on ppljustGo myMovieName, myLabelName
  73.   if myMovieName&".DIR" = the movieName then
  74.     go to frame myLabelName
  75.   else go to frame myLabelName of movie myMovieName
  76. end justGo
  77.